package designpattern.singleton;

/**
 * @author or2
 * @Description 饿汉式 - 类加载时进行初始化
 * @create 2021年09月01日 时间: 15:53
 */
public class Hungry {
    private final static Hungry hungrySingleton;
    static {
        hungrySingleton = new Hungry();
    }

    private Hungry(){}

    private static Hungry getHungrySingleton() {
        return hungrySingleton;
    }
}
